home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audio / ALqueryparams.z / ALqueryparams
Encoding:
Text File  |  1998-10-20  |  8.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4. AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                          AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ALqueryparams - (obsolete) get descriptor/description pairs for audio
  10.      device state variables
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  14.  
  15.      lllloooonnnngggg AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((lllloooonnnngggg ddddeeeevvvviiiicccceeee,,,, lllloooonnnngggg ****PPPPVVVVbbbbuuuuffffffffeeeerrrr,,,, lllloooonnnngggg bbbbuuuuffffffffeeeerrrrlllleeeennnnggggtttthhhh))))
  16.  
  17. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  18.      _d_e_v_i_c_e         expects a device.  Currently, there is only one device,
  19.                     AL_DEFAULT_DEVICE.
  20.  
  21.      _P_V_b_u_f_f_e_r       expects an array of longs into which AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  22.                     can write descriptor/description pairs for each state
  23.                     variable associated with _d_e_v_i_c_e.  The even (0,2,4, ...)
  24.                     entries receive the descriptors. The odd entries (1,3,5,
  25.                     ...) receive the descriptions.  These descriptions take on
  26.                     one of four values:
  27.  
  28.                     ++++////----AAAALLLL____RRRRAAAANNNNGGGGEEEE____VVVVAAAALLLLUUUUEEEE if this device state variable can assume
  29.                     a range of values, and the range has some meaning, i.e.
  30.                     larger values mean more of whatever this parameter
  31.                     controls.  A value of ----AAAALLLL____RRRRAAAANNNNGGGGEEEE____VVVVAAAALLLLUUUUEEEE indicates that the
  32.                     parameter is read-only.
  33.  
  34.                     ++++////----AAAALLLL____EEEENNNNUUUUMMMM____VVVVAAAALLLLUUUUEEEE  if this device state variable assumes
  35.                     values from an enumerated type.  They still have a limited
  36.                     range, but there is no inherent relationship between them.
  37.                     A value of ----AAAALLLL____EEEENNNNUUUUMMMM____VVVVAAAALLLLUUUUEEEE indicates that the parameter is
  38.                     read-only.
  39.  
  40.      _b_u_f_f_e_r_l_e_n_g_t_h   expects the length of the buffer, in longs, pointed to by
  41.                     _P_V_b_u_f_f_e_r.
  42.  
  43. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  44.      AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss is obsolete and is provided for backward compatibility. The
  45.      preferred method is to use aaaallllQQQQuuuueeeerrrryyyyVVVVaaaalllluuuueeeessss((((3333ddddmmmm)))) with the AL_PARAMS
  46.      parameter to list the supported parameters, followed by
  47.      aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm)))) to get information about each supported parameter.
  48.  
  49.      AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) lets you get a list of descriptors for all the state
  50.      variables associated with the specified device.
  51.  
  52.      AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) also tells you whether the value of a state variable
  53.      must be one of a set of enumerated types or any number within a specific
  54.      range.  In both cases the values are numbers within the range returned by
  55.      AAAALLLLggggeeeettttmmmmiiiinnnnmmmmaaaaxxxx((((3333ddddmmmm)))) and have the default value returned by
  56.      AAAALLLLggggeeeettttddddeeeeffffaaaauuuulllltttt((((3333ddddmmmm)))).
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                          AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      Typical device parameters are expected to be things like volume and
  75.      sample rate. You can find a list of parameters and their descriptions in
  76.      AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))).
  77.  
  78.      AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) returns the length of the buffer (number of longs)
  79.      that is required to hold all pairs of descriptors/descriptions. If
  80.      _P_V_b_u_f_f_e_r is smaller than this value, you have not acquired a complete
  81.      list of descriptor/description pairs and should increase your _P_V_b_u_f_f_e_r
  82.      and try again.
  83.  
  84.      To simply determine the size of the buffer needed to hold the parameters
  85.      and descriptions, call AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) with _b_u_f_f_e_r_l_e_n_g_t_h set to zero.
  86.  
  87.      AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) can fail for the following reasons:
  88.  
  89.      AAAALLLL____BBBBAAAADDDD____DDDDEEEEVVVVIIIICCCCEEEE             _d_e_v_i_c_e is not valid.
  90.  
  91.      AAAALLLL____BBBBAAAADDDD____PPPPVVVVBBBBUUUUFFFFFFFFEEEERRRR           _P_V_b_u_f_f_e_r is null valued.
  92.  
  93.      AAAALLLL____BBBBAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRRLLLLEEEENNNNGGGGTTTTHHHH____OOOODDDDDDDD   _b_u_f_f_e_r_l_e_n_g_t_h is odd.
  94.  
  95.      AAAALLLL____BBBBAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRRLLLLEEEENNNNGGGGTTTTHHHH____NNNNEEEEGGGG   _b_u_f_f_e_r_l_e_n_g_t_h is negative.
  96.  
  97.      AAAALLLL____BBBBAAAADDDD____DDDDEEEEVVVVIIIICCCCEEEE____AAAACCCCCCCCEEEESSSSSSSS      audio hardware is inaccessible.
  98.  
  99. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  100.                #include <dmedia/audio.h>
  101.                #include <malloc.h>
  102.                ...
  103.                /* Get a buffer containing all the device parameters. */
  104.                long *buf,buflen;
  105.                buflen=ALqueryparams(AL_DEFAULT_DEVICE,0,0);
  106.                buf=(long *)malloc(buflen*sizeof(long));
  107.                (void)ALqueryparams(AL_DEFAULT_DEVICE,buf,buflen);
  108.  
  109.  
  110. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  111.      Upon successful completion AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) returns the size of the
  112.      buffer, in longs, needed to hold all the descriptor/description pairs for
  113.      _d_e_v_i_c_e. Otherwise, AAAALLLLqqqquuuueeeerrrryyyyppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) returns -1 and sets an error number
  114.      which can be retrieved with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
  115.  
  116. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  117.      ALgetparams(3dm), ALsetparams(3dm), ALgetminmax(3dm), ALgetname(3dm),
  118.      ALgetdefault(3dm), ALsetdevice(3dm), oserror(3C)
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.